/* 任务操作面板样式 */

.task-action-panel {
  height: 100%;
}

.action-panel-card {
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: none;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.action-panel-card .ant-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.action-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.action-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-title {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f5f5f5;
}

.action-panel-card .ant-btn {
  height: 36px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-panel-card .ant-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-panel-card .ant-btn-primary {
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
}

.action-panel-card .ant-btn-primary:hover {
  box-shadow: 0 4px 16px rgba(24, 144, 255, 0.3);
}

.action-panel-card .ant-btn-dangerous {
  border-color: #ff4d4f;
  color: #ff4d4f;
}

.action-panel-card .ant-btn-dangerous:hover {
  background-color: #fff2f0;
  border-color: #ff7875;
  color: #ff7875;
}

.action-panel-card .ant-btn-dashed {
  border-style: dashed;
  border-color: #d9d9d9;
}

.action-panel-card .ant-btn-dashed:hover {
  border-color: #40a9ff;
  color: #40a9ff;
}

.action-panel-card .ant-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.action-panel-card .ant-btn .anticon {
  margin-right: 6px;
}

/* 状态提示样式 */
.status-hint {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  text-align: center;
}

/* 按钮图标动画 */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.action-panel-card .ant-btn-loading .anticon {
  animation: spin 1s linear infinite;
}

/* 特殊按钮样式 */
.action-panel-card .ant-btn[style*="rgb(82, 196, 26)"] {
  background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
  border: none;
}

.action-panel-card .ant-btn[style*="rgb(250, 173, 20)"] {
  background: linear-gradient(135deg, #faad14 0%, #ffc53d 100%);
  border: none;
}

.action-panel-card .ant-btn[style*="rgb(114, 46, 209)"] {
  background: linear-gradient(135deg, #722ed1 0%, #9254de 100%);
  border: none;
}

.action-panel-card .ant-btn[style*="rgb(24, 144, 255)"] {
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
  border: none;
}

/* Tooltip 优化 */
.action-panel-card .ant-tooltip {
  z-index: 1050;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .task-action-panel {
    margin-top: 16px;
  }
  
  .action-section {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }
  
  .action-panel-card .ant-btn {
    height: 32px;
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .action-section {
    margin-bottom: 12px;
    padding-bottom: 10px;
  }
  
  .section-title {
    margin-bottom: 8px;
    padding-bottom: 6px;
  }
  
  .action-panel-card .ant-btn {
    height: 36px;
    font-size: 13px;
  }
  
  .status-hint {
    padding-top: 12px;
  }
}

/* 卡片头部样式 */
.action-panel-card .ant-card-head {
  border-bottom: 1px solid #f0f0f0;
  padding: 12px 20px 8px;
  min-height: auto;
}

.action-panel-card .ant-card-head-title {
  padding: 0;
  font-size: 14px;
}

/* 按钮禁用状态 */
.action-panel-card .ant-btn[disabled]:hover {
  transform: none;
  box-shadow: none;
}

/* Space 组件优化 */
.action-panel-card .ant-space-vertical {
  width: 100%;
}

.action-panel-card .ant-space-item {
  width: 100%;
}

/* 重试次数标识 */
.action-panel-card .ant-btn span[style*="font-size: 11px"] {
  opacity: 0.8;
  font-weight: normal;
}

/* 加载状态优化 */
.action-panel-card .ant-btn-loading {
  pointer-events: none;
}

.action-panel-card .ant-btn-loading .anticon:not(.anticon-loading) {
  animation: none;
}

/* 危险操作警告 */
.action-panel-card .ant-btn-dangerous {
  position: relative;
}

.action-panel-card .ant-btn-dangerous::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 77, 79, 0.1) 50%, transparent 70%);
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.action-panel-card .ant-btn-dangerous:hover::before {
  opacity: 1;
}